import 'package:flutterproject/generated/json/base/json_convert_content.dart';
import 'package:flutterproject/page/mine/children/my_group/data/my_group_bean.dart';

MyGroupBean $MyGroupBeanFromJson(Map<String, dynamic> json) {
	final MyGroupBean myGroupBean = MyGroupBean();
	final List<MyGroupChildren>? children = jsonConvert.convertListNotNull<MyGroupChildren>(json['children']);
	if (children != null) {
		myGroupBean.children = children;
	}
	final int? level = jsonConvert.convert<int>(json['level']);
	if (level != null) {
		myGroupBean.level = level;
	}
	final int? shareNum = jsonConvert.convert<int>(json['shareNum']);
	if (shareNum != null) {
		myGroupBean.shareNum = shareNum;
	}
	final int? teamAmount = jsonConvert.convert<int>(json['teamAmount']);
	if (teamAmount != null) {
		myGroupBean.teamAmount = teamAmount;
	}
	return myGroupBean;
}

Map<String, dynamic> $MyGroupBeanToJson(MyGroupBean entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['children'] =  entity.children?.map((v) => v.toJson()).toList();
	data['level'] = entity.level;
	data['shareNum'] = entity.shareNum;
	data['teamAmount'] = entity.teamAmount;
	return data;
}

MyGroupChildren $MyGroupChildrenFromJson(Map<String, dynamic> json) {
	final MyGroupChildren myGroupChildren = MyGroupChildren();
	final int? createTime = jsonConvert.convert<int>(json['createTime']);
	if (createTime != null) {
		myGroupChildren.createTime = createTime;
	}
	final int? level = jsonConvert.convert<int>(json['level']);
	if (level != null) {
		myGroupChildren.level = level;
	}
	final String? mobile = jsonConvert.convert<String>(json['mobile']);
	if (mobile != null) {
		myGroupChildren.mobile = mobile;
	}
	final int? myAmount = jsonConvert.convert<int>(json['myAmount']);
	if (myAmount != null) {
		myGroupChildren.myAmount = myAmount;
	}
	final int? teamAmount = jsonConvert.convert<int>(json['teamAmount']);
	if (teamAmount != null) {
		myGroupChildren.teamAmount = teamAmount;
	}
	return myGroupChildren;
}

Map<String, dynamic> $MyGroupChildrenToJson(MyGroupChildren entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['createTime'] = entity.createTime;
	data['level'] = entity.level;
	data['mobile'] = entity.mobile;
	data['myAmount'] = entity.myAmount;
	data['teamAmount'] = entity.teamAmount;
	return data;
}